﻿using System.Configuration.Provider;

namespace OZDoo.Core.Caching
{
    /// <summary>
    /// 缓存的提供者抽象类,用于继承
    /// </summary>
    public abstract class CacheProvider : ProviderBase, ICache
    {

        #region ICache 成员

        public abstract void Clear();
        public abstract object Get(string key);
        public abstract void Insert(string key, object obj);
        public abstract void Insert(string key, object obj, System.Web.Caching.CacheDependency dep);
        public abstract void Insert(string key, object obj, int seconds, System.Web.Caching.CacheItemPriority priority);
        public abstract void Insert(string key, object obj, System.Web.Caching.CacheDependency dep, int seconds, System.Web.Caching.CacheItemPriority priority);
        public abstract void Insert(string key, object obj, System.Web.Caching.CacheDependency dep, int seconds);
        public abstract void Insert(string key, object obj, int seconds);
        public abstract void Max(string key, object obj);
        public abstract void Max(string key, object obj, System.Web.Caching.CacheDependency dep);
        public abstract void MicroInsert(string key, object obj, int secondFactor);
        public abstract void Permanent(string key, object obj, System.Web.Caching.CacheDependency dep);
        public abstract void Permanent(string key, object obj);
        public abstract void Remove(string key);
        public abstract void RemoveByPattern(string pattern);
        public abstract void ReSetFactor(int cacheFactor);
        public abstract int SecondFactorCalculate(int seconds);
        public abstract string[] GetAllCache();
        #endregion
    }
}
